Skip to content

fix: 停止生成服务时进行中的请求返回生成服务已停止 - #216

Merged
Mag1cFall merged 1 commit into
mainfrom
fix/stop-reason
Nov 22, 2026
Merged

Mag1cFall merged 1 commit into
mainfrom
fix/stop-reason

Conversation

@Mag1cFall

Copy link
Copy Markdown
Owner

Fixes #204

  • 修了什么:在管理页面停止生成服务时,进行中的请求以 503 “Service unavailable: context canceled”(request_canceled)结束,看不出是服务被停止。
  • 原因:停止生成服务会取消进行中的请求,请求结束时只报告上下文被取消或底层随之关闭的错误,没有区分是客户端取消还是生成服务已停止。
  • 怎么修的:请求所属的生成服务已停止时,以 service_stopped 结束并写明生成服务已停止(响应头未发出时为 503,流式请求为错误事件),生成、计数、标题、图片、视频、文件、embedding、转写与 Live 一并处理。

@Mag1cFall
Mag1cFall merged commit 792d67a into main Nov 22, 2026
4 checks passed
@Mag1cFall
Mag1cFall deleted the fix/stop-reason branch November 22, 2026 03:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Streaming requests with large context (~220k+ tokens) hang 5–12+ minutes with zero bytes before dropping

1 participant